package com.feng.gaoerfu.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;

/**
 * @time 2017/8/9 0009 15:37
 */

public class StringUtils {

    public static ArrayList<String> getBarsNum(int num) {
        HashMap<Integer, String> map = new HashMap();
        map.put(num, "标准杆" + num);
        int temp = num;
        while (temp > 0) {
            switch (num - (--temp)) {
                case 1:
                    int i1 = num - 1;
                    map.put(i1, "小鸟 " + i1);
                    break;
                case 2:
                    int i2 = num - 2;
                    map.put(i2, "老鹰 " + i2);
                    break;
                case 3:
                    int i3 = num - 3;
                    map.put(i3, "信天翁 " + i3);
                    break;
                default:
                    map.put(temp, "信天翁 " + temp);
                    break;
            }
        }
        map.put(0, "重置");
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < map.size(); i++) {
            list.add(map.get(i));
        }
        for (int i = 0; i < 18 - num; i++) {
            list.add("+" + (i + 1) + "柏忌 " + (num + i + 1));
        }
        return list;
    }

    public static int random(int min, int max) {
        Random random = new Random();

        int s = random.nextInt(max) % (max - min + 1) + min;
        return s;
    }
}
